package cn.tedu.egbank.transaction.mapper;

import cn.tedu.egbank.transaction.pojo.entity.Transaction;
import cn.tedu.egbank.transaction.pojo.vo.*;

import java.math.BigDecimal;

public interface TransactionMapper {
    int insertTransaction(Transaction transaction);

    int deposit(Integer accountId, BigDecimal amount);

    DepositVO selectNewDeposit(Transaction transaction);

    BigDecimal selectBalance(Integer accountId);

    int withdraw(Integer accountId, BigDecimal amount);

    WithdrawVO selectNewWithdraw(Transaction transaction);

    int transferFrom(Integer fromAccountId,BigDecimal amount);

    int transferTo( Integer toAccountId, BigDecimal amount);


    DetailTransactionVO selectDetail(Integer transactionId);
}
